# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=cvechecker
pkgver=4.0
pkgrel=2
pkgdesc='The goal of cvechecker is to report about possible vulnerabilities on your system, by scanning the installed software and matching the results with the CVE database. '
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-scanner')
url='https://github.com/sjvermeu/cvechecker'
license=('GPL-3.0-only')
depends=('libconfig>=1.3' 'sqlite3' 'wget' 'libxslt' 'libbsd')
makedepends=('automake' 'autoconf' 'libbsd')
source=("https://github.com/sjvermeu/cvechecker/archive/$pkgname-$pkgver.tar.gz")
sha512sums=('c24aa1e69ed44aeafbe63c1361614735b7a380788f1aa7fc7fcdc69c2e41f941a01f2f5c2b3b54e4f1171e29d984414c1e4fd2e082094a0688b7a12e36e19375')
install="$pkgname.install"

prepare() {
  cd "$pkgname-$pkgname-$pkgver"

  autoheader
  aclocal --force
  automake --add-missing --force-missing
}

build() {
  cd "$pkgname-$pkgname-$pkgver"

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --includedir=/usr/include --enable-sqlite3

  make
}

package() {
  cd "$pkgname-$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
}

